# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BigtableAdmin.V2.Model.ClusterState do
  @moduledoc """
  The state of a table's data in a particular cluster.

  ## Attributes

  *   `encryptionInfo` (*type:* `list(GoogleApi.BigtableAdmin.V2.Model.EncryptionInfo.t)`, *default:* `nil`) - Output only. The encryption information for the table in this cluster. If the encryption key protecting this resource is customer managed, then its version can be rotated in Cloud Key Management Service (Cloud KMS). The primary version of the key and its status will be reflected here when changes propagate from Cloud KMS.
  *   `replicationState` (*type:* `String.t`, *default:* `nil`) - Output only. The state of replication for the table in this cluster.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :encryptionInfo => list(GoogleApi.BigtableAdmin.V2.Model.EncryptionInfo.t()) | nil,
          :replicationState => String.t() | nil
        }

  field(:encryptionInfo, as: GoogleApi.BigtableAdmin.V2.Model.EncryptionInfo, type: :list)
  field(:replicationState)
end

defimpl Poison.Decoder, for: GoogleApi.BigtableAdmin.V2.Model.ClusterState do
  def decode(value, options) do
    GoogleApi.BigtableAdmin.V2.Model.ClusterState.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BigtableAdmin.V2.Model.ClusterState do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
